<?php


class Snippet_IndexController extends WSB_Xtension_Static
{

	public function indexAction()
	{
		$config = $this->getConfiguration();
		if(!isset($config->path) || empty($config->path)) {
			$this->addContent('<div style="background:red;color:white;">Configuration error: No or invalid path.</div>');
		}
		if(file_exists($config->path)) {
			$this->_view->addScriptPath(WSB_PATH);
			$this->_view->render($config->path);
			$this->addcontent($this->_view->render($config->path));
		}
	}

}
